//
//  YYLabel+Night.m
//  QiuBai
//
//  Created by Anyfish002 on 16/5/25.
//  Copyright © 2016年 yaohongchao. All rights reserved.
//

#import "YYLabel+Night.h"

@interface YYLabel ()

@property (nonatomic, strong) NSMutableDictionary<NSString *, DKColorPicker> *pickers;

@end

@implementation YYLabel (Night)


- (DKColorPicker)dk_textColorPicker {
    return objc_getAssociatedObject(self, @selector(dk_textColorPicker));
}

- (void)dk_setTextColorPicker:(DKColorPicker)picker {
    objc_setAssociatedObject(self, @selector(dk_textColorPicker), picker, OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.textColor = picker(self.dk_manager.themeVersion);
    [self.pickers setValue:[picker copy] forKey:@"setTextColor:"];
}

- (DKColorPicker)dk_shadowColorPicker {
    return objc_getAssociatedObject(self, @selector(dk_shadowColorPicker));
}

- (void)dk_setShadowColorPicker:(DKColorPicker)picker {
    objc_setAssociatedObject(self, @selector(dk_shadowColorPicker), picker, OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.shadowColor = picker(self.dk_manager.themeVersion);
    [self.pickers setValue:[picker copy] forKey:@"setShadowColor:"];
}

- (DKColorPicker)dk_highlightedTextColorPicker {
    return objc_getAssociatedObject(self, @selector(dk_highlightedTextColorPicker));
}

- (void)dk_setHighlightedTextColorPicker:(DKColorPicker)picker {
    objc_setAssociatedObject(self, @selector(dk_highlightedTextColorPicker), picker, OBJC_ASSOCIATION_COPY_NONATOMIC);
    [self.pickers setValue:[picker copy] forKey:@"setHighlightedTextColor:"];
}


@end
